]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
theme: Define default user-icon sizing in SASS
authorJoonas Henriksson <joonas.henriksson@gmail.com>
Sun, 1 Nov 2020 08:55:45 +0000 (10:55 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 17 Dec 2020 20:46:32 +0000 (21:46 +0100)
The default sizing for user-icon style was not defined in the theme,
but it simply used the default Avatar iconSize from UserWidget.js.

This didn't work with the current fallback avatar styling (i.e. when
the avatar icon is not set for an user account, and a symbolic icon
is displayed in its place), as the fallback StIcon was not scaled
to align inside the circle shaped user-icon properly.

Define the user-icon and corrected fallback StIcon sizes in the
stylesheet to correct this. The default 64px user-icon size is based
on default UserWidget.Avatar iconSize. The sizing for the StIcon is
taken from `.user-widget.horizontal .user-icon` styling, which uses
the same base icon-size.

Additionally, the special `.user-widget.horizontal .user-icon`
styling is removed, as it is now redundant.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1490>

data/theme/gnome-shell-sass/widgets/_misc.scss

index 96dd4d1dd74cdf1f549292b65decc0f4c6d44139..b2f22fc71ab9608231f6b4276be3d8e8f3e0c3f9 100644 (file)
@@ -10,6 +10,7 @@
   color: $osd_fg_color;
   border-radius: 99px;
   border: 2px $osd_fg_color;
+  icon-size: $base_icon_size * 4; // 64px
   &:hover {
     color: lighten($osd_fg_color,30%);
   }
@@ -17,6 +18,8 @@
   & StIcon {
     background-color: transparentize($osd_fg_color,0.95);
     border-radius: 99px;
+    padding: $base_padding * 2 ; // 12px
+    width: $base_icon_size * 2.5; height:  $base_icon_size * 2.5; // 40px;
   }
 }
 
   }
 }
 
-.user-widget.horizontal .user-icon {
-  icon-size: $base_icon_size * 4; // 64px
-
-  & StIcon {
-    padding: $base_padding * 2 ; // 12px
-    width: $base_icon_size * 2.5; height:  $base_icon_size * 2.5; // 40px;
-  }
-}
-
 .lightbox { background-color: black; }
 .flashspot { background-color: white; }